import axios from '@/libs/axios1';
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' };
let baseUrl = '/scientific/share';

// 分享科研信息
export const shareContent = (data) => {
    return axios({
        url: `${baseUrl}`,
        method: 'POST',
        data,
        headers: jsonHeaders
    });
};

//查询分享列表
export const getShareContent = (params) => {
    return axios({
        url: `${baseUrl}/page`,
        method: 'GET',
        params,
        headers: jsonHeaders
    });
};
// 获取分享人员列表
export const getShareList = params => {
    return axios({
        url: `${baseUrl}/getByContent`,
        method: 'GET',
        params,
        headers: jsonHeaders,
    })
}

// 取消分享
export const unshareContent = data => {
    return axios({
        url: `${baseUrl}`,
        data,
        method: 'PUT',
        headers: jsonHeaders,
    })
}
